关于oracle数据库的一道面试题,使用wm_concat()主函数完成答:WITH div_pm_ci AS(select ci_id, substr( stu_ids, instr(','|| stu_ids, ',', 1, rn),instr( stu_ids||',', ',', 1, rn) - instr(','|| stu_ids, ',', 1, rn) ) stu_id from pm_ci,(select rownum rn from dual connect by rownum < 10)where instr(','|| ...
求Oracle分组统计数量的sql怎么写,需求如下答:5,'04(5)');insert into test values (5,'04(5)');insert into test values (5,'03(5)');commit;查询:select ssbm||'('||cnt||')' from (select substr(ssbm,1,instr(ssbm,'(')-1) ssbm,count(*) cnt from test group by substr(ssbm,1,instr(ssbm,'(')-1)) t结果:...